<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
</head>
<body>
    <div class="app">
        <!-- 方法一  更简便 -->
        <!-- <header>
            <button @click="show = 0">huefei</button>
            <button @click="show = 1">jipiao</button>
            <button @click="show = 2">jiudian</button>
        </header> -->

        <header>
            <button @click="handle0">huefei</button>
            <button @click="handle1">jipiao</button>
            <button @click="handle2">jiudian</button>
        </header>
        <footer>
            <!-- huafei内容 -->
            <ul v-show="show == 0">
                <li>话费内容</li>
                <li>
                    <input type="text" value="话费内容">
                </li>
            </ul>
                <!-- 机票内容 -->
                <ul v-show="show == 1">
                    <li>机票内容</li>
                    <li>
                        <input type="text" value="机票内容">
                    </li>
                </ul>
                    <!-- 酒店内容 -->
            <ul v-show="show == 2">
                <li>酒店内容</li>
                <li>
                    <input type="text" value="酒店内容">
                </li>
            </ul>
        </footer>
    </div>
</body>
</html>
<script>
    const VM = new Vue({
        el:'.app',
        data:{
            show:0
        },
        // 方法二
        methods:{
            handle0(){
                this.show = 0;
            },
            handle1(){
                this.show = 1;
            },
            handle2(){
                this.show = 2;
            }
        }



    })
</script>